{include file="../../../templates/header.tpl"}
<script type="text/javascript" language="javascript">
{literal}
function changeGroups(){
 $.post("ajax/ajax_register.php",{sel_val:$("#faculty_id").val()},function(data){
 		$("#group_id").after(data).remove();
		$("#group_select").addClass("user_value").attr("name","group_id").attr("id","group_id");
	});
}

{/literal}
</script>

<div style="height:5px;"></div>
<h1>User Settings</h1>
<center>
<form action="index.php?option=settings&task=save" method="post">
<TABLE width="400px">
<TR><TD class="user_title">ID:</TD><TD id="value_id" class="user_value_unchangable">{$user.id}</TD></TR>
<TR><TD class="user_title">LOGIN:</TD><TD id="value_u_login" class="user_value_unchangable">{$user.u_login}</TD></TR>

<TR><TD class="user_title">Name:</TD><TD><input id="value_u_name" class="user_value" value="{$user.u_name}" name="u_name" /></TD></TR>
<TR><TD class="user_title">Surname:</TD><TD><input id="value_u_name" class="user_value" value="{$user.u_surname}" name="u_surname" /></TD></TR>
<TR><TD class="user_title">Faculty:</TD>
	<TD>
	<select id="faculty_id" name="faculty_id" class="user_value" onchange="changeGroups()">
	{html_options options=$faculties selected=$group.faculty_id} 
	</select>
	</TD>
</TR>
<TR><TD class="user_title">Group:</TD>
	<TD>
	<select id="group_id" name="group_id" class="user_value">
	{html_options options=$groups selected=$user.group_id} 
	</select>
	</TD>
</TR>
<TR><TD class="user_title">E-Mail:</TD><TD><input id="value_u_email" class="user_value" value="{$user.u_email}" name="u_email" /></TD></TR>
<TR><TD class="user_title">Registered:</TD><TD id="value_u_registerdate" class="user_value_unchangable">{$user.u_registerdate}</TD></TR>
<TR><TD class="user_title">Last visit:</TD><TD id="value_u_lastvisitdate" class="user_value_unchangable">{$user.u_lastvisitdate}</TD></TR>
<TR><TD class="user_title"></TD><TD align="right"><div id="leftPango" style="width:100%;"><input class="user_submit" type="submit" value="Save changes" /></div></TD></TR>
</TABLE>
</form>
</center>
{include file="../../../templates/footer.tpl"}